﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace RSSReader.DAL
{
  public class Article
  {
    [Key]
    public int Id { get; set; }

    public int SourceId { get; set; }
    public virtual Source Source { get; set; }

    [Required]
    [Column(TypeName = "nvarchar")]
    [MaxLength(2083)]
    [Index(IsUnique = true)]
    public string Url { get; set; }

    //[Required]
    [Column(TypeName = "nvarchar")]
    [MaxLength(200)]
    public string Title { get; set; }

    //[Required]
    [Column(TypeName = "nvarchar")]
    [MaxLength(2048)]
    public string Description { get; set; }

    //[Column(TypeName = "nvarchar")]
    public DateTime? PublicationDate { get; set; }
  }
}